﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Urgencias.Modelo
{
    class Paciente:Persona
    {
        private string telefonoPaciente;

        public string TelefonoPaciente
        {
            get { return telefonoPaciente; }
            set { telefonoPaciente = value; }
        }
        private string direccionPaciente;

        public string DireccionPaciente
        {
            get { return direccionPaciente; }
            set { direccionPaciente = value; }
        }
        private string previsionPaciente;

        public string PrevisionPaciente
        {
            get { return previsionPaciente; }
            set { previsionPaciente = value; }
        }

        public System.Collections.Generic.List<ConsultaMedica> consultasMedicas;

        /// <summary>
        /// Property for collection of ConsultaMedica
        /// </summary>
        /// <pdGenerated>Default opposite class collection property</pdGenerated>
        public System.Collections.Generic.List<ConsultaMedica> ConsultasMedicas
        {
            get
            {
                if (consultasMedicas == null)
                    consultasMedicas = new System.Collections.Generic.List<ConsultaMedica>();
                return consultasMedicas;
            }
            set
            {
                RemoveAllConsultaMedica();
                if (value != null)
                {
                    foreach (ConsultaMedica oConsultaMedica in value)
                        AddConsultaMedica(oConsultaMedica);
                }
            }
        }

        /// <summary>
        /// Add a new ConsultaMedica in the collection
        /// </summary>
        /// <pdGenerated>Default Add</pdGenerated>
        public void AddConsultaMedica(ConsultaMedica newConsultaMedica)
        {
            if (newConsultaMedica == null)
                return;
            if (this.consultasMedicas == null)
                this.consultasMedicas = new System.Collections.Generic.List<ConsultaMedica>();
            if (!this.consultasMedicas.Contains(newConsultaMedica))
                this.consultasMedicas.Add(newConsultaMedica);
        }

        /// <summary>
        /// Remove an existing ConsultaMedica from the collection
        /// </summary>
        /// <pdGenerated>Default Remove</pdGenerated>
        public void RemoveConsultaMedica(ConsultaMedica oldConsultaMedica)
        {
            if (oldConsultaMedica == null)
                return;
            if (this.consultasMedicas != null)
                if (this.consultasMedicas.Contains(oldConsultaMedica))
                    this.consultasMedicas.Remove(oldConsultaMedica);
        }

        /// <summary>
        /// Remove all instances of ConsultaMedica from the collection
        /// </summary>
        /// <pdGenerated>Default removeAll</pdGenerated>
        public void RemoveAllConsultaMedica()
        {
            if (consultasMedicas != null)
                consultasMedicas.Clear();
        }
        public System.Collections.Generic.List<Urgencia> urgencia;

        /// <summary>
        /// Property for collection of Urgencia
        /// </summary>
        /// <pdGenerated>Default opposite class collection property</pdGenerated>
        public System.Collections.Generic.List<Urgencia> Urgencia
        {
            get
            {
                if (urgencia == null)
                    urgencia = new System.Collections.Generic.List<Urgencia>();
                return urgencia;
            }
            set
            {
                RemoveAllUrgencia();
                if (value != null)
                {
                    foreach (Urgencia oUrgencia in value)
                        AddUrgencia(oUrgencia);
                }
            }
        }

        /// <summary>
        /// Add a new Urgencia in the collection
        /// </summary>
        /// <pdGenerated>Default Add</pdGenerated>
        public void AddUrgencia(Urgencia newUrgencia)
        {
            if (newUrgencia == null)
                return;
            if (this.urgencia == null)
                this.urgencia = new System.Collections.Generic.List<Urgencia>();
            if (!this.urgencia.Contains(newUrgencia))
                this.urgencia.Add(newUrgencia);
        }

        /// <summary>
        /// Remove an existing Urgencia from the collection
        /// </summary>
        /// <pdGenerated>Default Remove</pdGenerated>
        public void RemoveUrgencia(Urgencia oldUrgencia)
        {
            if (oldUrgencia == null)
                return;
            if (this.urgencia != null)
                if (this.urgencia.Contains(oldUrgencia))
                    this.urgencia.Remove(oldUrgencia);
        }

        /// <summary>
        /// Remove all instances of Urgencia from the collection
        /// </summary>
        /// <pdGenerated>Default removeAll</pdGenerated>
        public void RemoveAllUrgencia()
        {
            if (urgencia != null)
                urgencia.Clear();
        }
        public System.Collections.Generic.List<Pago> cobro;

        /// <summary>
        /// Property for collection of Pago
        /// </summary>
        /// <pdGenerated>Default opposite class collection property</pdGenerated>
        public System.Collections.Generic.List<Pago> Cobro
        {
            get
            {
                if (cobro == null)
                    cobro = new System.Collections.Generic.List<Pago>();
                return cobro;
            }
            set
            {
                RemoveAllCobro();
                if (value != null)
                {
                    foreach (Pago oPago in value)
                        AddCobro(oPago);
                }
            }
        }

        /// <summary>
        /// Add a new Pago in the collection
        /// </summary>
        /// <pdGenerated>Default Add</pdGenerated>
        public void AddCobro(Pago newPago)
        {
            if (newPago == null)
                return;
            if (this.cobro == null)
                this.cobro = new System.Collections.Generic.List<Pago>();
            if (!this.cobro.Contains(newPago))
                this.cobro.Add(newPago);
        }

        /// <summary>
        /// Remove an existing Pago from the collection
        /// </summary>
        /// <pdGenerated>Default Remove</pdGenerated>
        public void RemoveCobro(Pago oldPago)
        {
            if (oldPago == null)
                return;
            if (this.cobro != null)
                if (this.cobro.Contains(oldPago))
                    this.cobro.Remove(oldPago);
        }

        /// <summary>
        /// Remove all instances of Pago from the collection
        /// </summary>
        /// <pdGenerated>Default removeAll</pdGenerated>
        public void RemoveAllCobro()
        {
            if (cobro != null)
                cobro.Clear();
        }
    }
}
